]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
background: Don't override synchronous load() with an async version
authorEvan Welsh <contact@evanwelsh.com>
Sat, 30 Oct 2021 22:11:10 +0000 (15:11 -0700)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 11 Jan 2022 20:24:26 +0000 (21:24 +0100)
Instead, override the asynchronous version to avoid conflicting with
the parent signature.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2040>

js/ui/background.js

index 1f7c5e57200c20462141a44167f1d39a0379a541..1ddb9d6f3d78212a080fec291c548495dc8cb09e 100644 (file)
@@ -177,7 +177,7 @@ var BackgroundCache = class BackgroundCache {
 
         animation = new Animation({ file: params.file });
 
-        animation.load(() => {
+        animation.load_async(null, () => {
             this._animations[params.settingsSchema] = animation;
 
             if (params.onLoaded) {
@@ -634,11 +634,12 @@ class Animation extends GnomeDesktop.BGSlideShow {
         this.loaded = false;
     }
 
-    load(callback) {
-        this.load_async(null, () => {
+    // eslint-disable-next-line camelcase
+    load_async(cancellable, callback) {
+        super.load_async(cancellable, () => {
             this.loaded = true;
-            if (callback)
-                callback();
+
+            callback?.();
         });
     }